<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.staticfile.net/font-awesome/4.7.0/css/font-awesome.css">
    <title>Document</title>
<style>
    body{
        background: rgb(53, 226, 53);
        font-family: 'Open Sans',sans-serif;
    }
    .search{
        width: 100%;
        position: relative;
        display: flex;
    }
    .searchTerm{
        width: 100%;
        border: 3px solid #00B4CC;
        border-right: none;
        padding: 5px;
        height: 20px;
        border-radius: 5px 0 0 5px;
        outline: none;
        color: #00B4CC;
    }
    .searchTerm:focus{
        color: #00B4CC;
    }
    .searchButton{
        width: 40px;
        height: 36px;
        border: 1px solid #00B4CC;
        background: #00B4CC;
        text-align: center;
        color: #fff;
        border-radius: 0 5px 5px 0;
        cursor: pointer;
        font-size: 20px;
    }
    /* 调整大小查看搜索栏的变化 */
    .wrap{
        width: 30%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
    }
</style>
</head>
<body>
    <h2>搜索框 - 带按钮</h2>
    <div class="wrap">
        <div class="search">
            <input type="text" class="searchTerm" placeholder="你想找什么？">
            <button type="submit" class="searchButton">
                <i class="fa fa-search"></i>
            </button>
        </div>
    </div>
</body>
</html>